#!/usr/bin/python
import subprocess

def get_report():
    output = subprocess.Popen('df --local --portability --print-type --block-size=1'.split(),
        stdout=subprocess.PIPE).communicate()[0]
    result = {}
    for line in output.split('\n'):
        bits = line.split()
        if bits and bits[0].startswith('/'):
            device, type_, _x, used, available, _xx, mount_point = bits
            used = int(used)
            available = int(available)
            result[mount_point] = {
                'total': used + available,
                'used': used,
                'device': device,
                'type': type_,
            }
    return result

if __name__ == '__main__':
    print get_report()
